<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>

    <title th:text="#{screen.pac4j.unauthz.pagetitle}">Pac4j Stop Webflow View</title>
    <link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag"/>
</head>

<body>
<main role="main" class="container mt-3 mb-3">
    <div id="content" layout:fragment="content">
        <div class="uk-card uk-card-default uk-width-auto" style="box-shadow: none;background-color: transparent">
            <div class="uk-card-media-top uk-flex uk-flex-center">
                <img th:src="@{/images/error.svg}" width="360" alt="">
            </div>
            <div class="uk-card-body uk-text-center">
                <h3 class="uk-card-title uk-text-danger"
                    th:if="${rootCauseException.class.simpleName} eq 'UnresolvedPrincipalException'"
                    th:utext="#{authenticationFailure.FailedLoginException}">FailedLoginException</h3>
                <h3 class="uk-card-title uk-text-danger"
                    th:unless="${rootCauseException.class.simpleName} eq 'UnresolvedPrincipalException'"
                    th:utext="#{screen.pac4j.unauthz.heading}">Unauthorized Access</h3>
                <div class="uk-text-meta">
                    <!--                <p th:utext="#{screen.pac4j.unauthz.message}">Either the authentication request was rejected/cancelled,-->
                    <!--                    or the authentication provider denied access due to permissions, etc. Review logs to find the root-->
                    <!--                    cause of the issue.</p>-->
                    <!--                <p th:if="${rootCauseException}" th:text="${rootCauseException.getMessage()}"></p>-->
                    <p>
                        <!--                    <i class="mdi mdi-alert fas fa-exclamation-triangle me-2"></i>-->
                        <span th:if="${rootCauseException}"
                              th:text="#{${'screen.pac4j.authn.' + rootCauseException.class.simpleName}}">
                      Authentication response provided to CAS by the external identity provider cannot be accepted.</span>
                        <span th:unless="${rootCauseException}" th:text="#{screen.pac4j.authn.unknown}">
                      Authentication response provided to CAS by the external identity provider cannot be accepted.</span>
                    </p>
                </div>
            </div>
        </div>
        <!--        <div class="uk-width-large uk-height-medium1 uk-card uk-card-default uk-card-body">-->
        <!--            -->
        <!--            <a class="uk-button uk-button-default" th:href="@{/login}" style="color:#333">-->
        <!--                <span th:utext="#{screen.error.page.loginagain}">Go Home</span>-->
        <!--            </a>-->
        <!--            <div class="d-flex">-->
        <!--                <div class="uk-margin">-->
        <!--                    <div class="uk-form-controls">-->
        <!--                        <div class="uk-inline">-->
        <!--                            <a id="loginLink" class="uk-button uk-button-primary" th:href="@{/login}">-->
        <!--                                    <span class="mdc-button__label"-->
        <!--                                          th:text="#{screen.pac4j.unauthz.login}">Back to CAS</span>-->
        <!--                            </a>-->
        <!--                            <a id="appLink" class="uk-button uk-button-primary" th:href="${service}">-->
        <!--                        <span class="mdc-button__label"-->
        <!--                              th:text="#{screen.pac4j.unauthz.gotoapp}">Goto Application</span>-->
        <!--                            </a>-->
        <!--                            <div class="uk-inline">-->
        <!--                                <form method="post" id="fm1">-->
        <!--                                    <input type="hidden" name="execution" th:value="${flowExecutionKey}"/>-->
        <!--                                    <input type="hidden" name="_eventId" value="retry"/>-->
        <!--                                    <button id="retryButton" class="uk-button uk-button-primary" name="retry"-->
        <!--                                            accesskey="r">-->
        <!--                                        <span class="mdc-button__label"-->
        <!--                                              th:text="#{screen.pac4j.button.retry}">Try Again</span>-->
        <!--                                    </button>-->
        <!--                                </form>-->
        <!--                                <div>-->
        <!--                                </div>-->
        <!--                            </div>-->
        <!--                        </div>-->
        <!--                    </div>-->
        <!--                </div>-->
        <!--        </div>-->
    </div>
</main>
</body>

</html>
